home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / laptop-mode-tools / modules / terminal-blanking < prev    next >
Encoding:
Text File  |  2012-05-20  |  1.1 KB  |  33 lines

  1. #! /bin/sh
  2. #
  3. # Laptop mode tools module: virtual terminal blanking
  4. #
  5.  
  6. # Set terminal blanking/powerdown timeouts
  7. if [ x$CONTROL_TERMINAL = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_TERMINAL = xauto ]; then
  8.     if [ $ON_AC -eq 1 ]; then
  9.         if [ "$ACTIVATE" -eq 1 ]; then
  10.             BLANK_MINUTES="$LM_AC_TERMINAL_BLANK_MINUTES"
  11.             POWERDOWN_MINUTES="$LM_AC_TERMINAL_POWERDOWN_MINUTES"
  12.         else
  13.             BLANK_MINUTES="$NOLM_AC_TERMINAL_BLANK_MINUTES"
  14.             POWERDOWN_MINUTES="$NOLM_AC_TERMINAL_POWERDOWN_MINUTES"
  15.         fi
  16.     else
  17.         BLANK_MINUTES="$BATT_TERMINAL_BLANK_MINUTES"
  18.         POWERDOWN_MINUTES="$BATT_TERMINAL_POWERDOWN_MINUTES"
  19.     fi
  20.     log "VERBOSE" "Set terminal blanking timeout to $BLANK_MINUTES min, powerdown timeout to $POWERDOWN_MINUTES min."
  21.     for THISTERMINAL in $TERMINALS ; do
  22.         if [ -e $THISTERMINAL ] ; then
  23.             log "VERBOSE" "Terminal $THISTERMINAL found, adjusting."
  24.             TERM=linux setterm -blank "$BLANK_MINUTES" -powerdown "$POWERDOWN_MINUTES" > $THISTERMINAL
  25.         else
  26.             log "VERBOSE" "Terminal $THISTERMINAL does not exist."
  27.         fi
  28.     done
  29. else
  30.     log "VERBOSE" "CONTROL_TERMINAL is disabled, skipping..."
  31. fi
  32.  
  33.